
cc.Class({
    extends: require('UI-PanelWindow'),

    properties: {
        cancelNode: cc.Node,
        inviteProgress :cc.Label
    },

    // LIFE-CYCLE CALLBACKS:

    // onLoad () {},

    start() {
        // this.inviteProgress.string = global.Data.inviteCount
    },

    setOptions(){
        this.cancelNode.active = false;
    },

    //关闭界面
    clickCancel() {
        SoundMgr.playButtonEffect()
        global.Data.isCheck=true
        global.EJMgr.popUI();
        if(global.gaming){
            // cc.audioEngine.resumeAll();
            var pause = global.UIMgr.pushUI('game/GamePause')
            pause.getComponent('GameUI-Pause').setOptions({revert:true,cb:function(){}});
        }
    },

    invite() {
        cc.log('邀请了');
        global.EJMgr.popUI();
        CC_WECHATGAME && global.Platform.share('还记得记忆中的雷电吗，快来跟我一起爽快射击吧', { parentId: global.Data._id })
    }
});
